home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Delphi Informant Complete 1995 - 2000
/
Delphi Informant Complete 1995 to 2000.iso
/
Delphi Informant Magazine Complete Works SOURCE CODE 1998.rar
/
1998
/
Mar
/
DI9803DM
/
CalendarX
/
CalendarX_TLB.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1997-12-09
|
10KB
|
290 lines
unit CalendarX_TLB;
{ This file contains pascal declarations imported from a type library.
This file will be written during each import or refresh of the type
library editor. Changes to this file will be discarded during the
refresh process. }
{ CalendarX Library }
{ Version 1.0 }
interface
uses Windows, ActiveX, Classes, Graphics, OleCtrls, StdVCL;
const
LIBID_CalendarX: TGUID = '{7FD22F02-C0E1-11D0-9BB9-00A024604D21}';
const
{ TxBorderStyle }
bsNone = 0;
bsSingle = 1;
const
{ Component class GUIDs }
Class_CalendarX: TGUID = '{7FD22F05-C0E1-11D0-9BB9-00A024604D21}';
type
{ Forward declarations: Interfaces }
ICalendarX = interface;
ICalendarXDisp = dispinterface;
ICalendarXEvents = dispinterface;
{ Forward declarations: CoClasses }
CalendarX = ICalendarX;
{ Forward declarations: Enums }
TxBorderStyle = TOleEnum;
{ Dispatch interface for CalendarX Control }
ICalendarX = interface(IDispatch)
['{7FD22F03-C0E1-11D0-9BB9-00A024604D21}']
function Get_CalendarDate: TDateTime; safecall;
procedure Set_CalendarDate(Value: TDateTime); safecall;
procedure NextMonth; safecall;
procedure NextYear; safecall;
procedure PrevMonth; safecall;
procedure PrevYear; safecall;
procedure UpdateCalendar; safecall;
function Get_BorderStyle: TxBorderStyle; safecall;
procedure Set_BorderStyle(Value: TxBorderStyle); safecall;
function Get_Color: TColor; safecall;
procedure Set_Color(Value: TColor); safecall;
function Get_Ctl3D: WordBool; safecall;
procedure Set_Ctl3D(Value: WordBool); safecall;
function Get_Day: Integer; safecall;
procedure Set_Day(Value: Integer); safecall;
function Get_Enabled: WordBool; safecall;
procedure Set_Enabled(Value: WordBool); safecall;
function Get_Font: Font; safecall;
procedure Set_Font(const Value: Font); safecall;
function Get_GridLineWidth: Integer; safecall;
procedure Set_GridLineWidth(Value: Integer); safecall;
function Get_Month: Integer; safecall;
procedure Set_Month(Value: Integer); safecall;
function Get_ParentColor: WordBool; safecall;
procedure Set_ParentColor(Value: WordBool); safecall;
function Get_ReadOnly: WordBool; safecall;
procedure Set_ReadOnly(Value: WordBool); safecall;
function Get_StartOfWeek: Smallint; safecall;
procedure Set_StartOfWeek(Value: Smallint); safecall;
function Get_UseCurrentDate: WordBool; safecall;
procedure Set_UseCurrentDate(Value: WordBool); safecall;
function Get_Visible: WordBool; safecall;
procedure Set_Visible(Value: WordBool); safecall;
function Get_Year: Integer; safecall;
procedure Set_Year(Value: Integer); safecall;
function Get_Cursor: Smallint; safecall;
procedure Set_Cursor(Value: Smallint); safecall;
property CalendarDate: TDateTime read Get_CalendarDate write Set_CalendarDate;
property BorderStyle: TxBorderStyle read Get_BorderStyle write Set_BorderStyle;
property Color: TColor read Get_Color write Set_Color;
property Ctl3D: WordBool read Get_Ctl3D write Set_Ctl3D;
property Day: Integer read Get_Day write Set_Day;
property Enabled: WordBool read Get_Enabled write Set_Enabled;
property Font: Font read Get_Font write Set_Font;
property GridLineWidth: Integer read Get_GridLineWidth write Set_GridLineWidth;
property Month: Integer read Get_Month write Set_Month;
property ParentColor: WordBool read Get_ParentColor write Set_ParentColor;
property ReadOnly: WordBool read Get_ReadOnly write Set_ReadOnly;
property StartOfWeek: Smallint read Get_StartOfWeek write Set_StartOfWeek;
property UseCurrentDate: WordBool read Get_UseCurrentDate write Set_UseCurrentDate;
property Visible: WordBool read Get_Visible write Set_Visible;
property Year: Integer read Get_Year write Set_Year;
property Cursor: Smallint read Get_Cursor write Set_Cursor;
end;
{ DispInterface declaration for Dual Interface ICalendarX }
ICalendarXDisp = dispinterface
['{7FD22F03-C0E1-11D0-9BB9-00A024604D21}']
property CalendarDate: TDateTime dispid 1;
procedure NextMonth; dispid 2;
procedure NextYear; dispid 3;
procedure PrevMonth; dispid 4;
procedure PrevYear; dispid 5;
procedure UpdateCalendar; dispid 6;
property BorderStyle: TxBorderStyle dispid 7;
property Color: TColor dispid 8;
property Ctl3D: WordBool dispid 9;
property Day: Integer dispid 10;
property Enabled: WordBool dispid 11;
property Font: Font dispid 12;
property GridLineWidth: Integer dispid 13;
property Month: Integer dispid 14;
property ParentColor: WordBool dispid 15;
property ReadOnly: WordBool dispid 16;
property StartOfWeek: Smallint dispid 17;
property UseCurrentDate: WordBool dispid 18;
property Visible: WordBool dispid 19;
property Year: Integer dispid 20;
property Cursor: Smallint dispid 21;
end;
{ Events interface for CalendarX Control }
ICalendarXEvents = dispinterface
['{7FD22F04-C0E1-11D0-9BB9-00A024604D21}']
procedure OnClick; dispid 1;
procedure OnChange; dispid 2;
procedure OnDblClick; dispid 3;
procedure OnKeyPress(var Key: Smallint); dispid 4;
end;
{ CalendarXControl }
TCalendarXOnKeyPress = procedure(Sender: TObject; var Key: Smallint) of object;
TCalendarX = class(TOleControl)
private
FOnClick: TNotifyEvent;
FOnChange: TNotifyEvent;
FOnDblClick: TNotifyEvent;
FOnKeyPress: TCalendarXOnKeyPress;
FIntf: ICalendarX;
function GetControlInterface: ICalendarX;
protected
procedure CreateControl;
procedure InitControlData; override;
function GetTOleEnumProp(Index: Integer): TOleEnum;
procedure SetTOleEnumProp(Index: Integer; Value: TOleEnum);
public
procedure NextMonth;
procedure NextYear;
procedure PrevMonth;
procedure PrevYear;
procedure UpdateCalendar;
property ControlInterface: ICalendarX read GetControlInterface;
published
property TabStop;
property Align;
property DragCursor;
property DragMode;
property ParentShowHint;
property PopupMenu;
property ShowHint;
property TabOrder;
property OnDragDrop;
property OnDragOver;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnStartDrag;
property CalendarDate: TDateTime index 1 read GetTDateTimeProp write SetTDateTimeProp stored False;
property BorderStyle: TxBorderStyle index 7 read GetTOleEnumProp write SetTOleEnumProp stored False;
property Color: TColor index 8 read GetTColorProp write SetTColorProp stored False;
property Ctl3D: WordBool index 9 read GetWordBoolProp write SetWordBoolProp stored False;
property Day: Integer index 10 read GetIntegerProp write SetIntegerProp stored False;
property Enabled: WordBool index 11 read GetWordBoolProp write SetWordBoolProp stored False;
property Font: TFont index 12 read GetTFontProp write SetTFontProp stored False;
property GridLineWidth: Integer index 13 read GetIntegerProp write SetIntegerProp stored False;
property Month: Integer index 14 read GetIntegerProp write SetIntegerProp stored False;
property ParentColor: WordBool index 15 read GetWordBoolProp write SetWordBoolProp stored False;
property ReadOnly: WordBool index 16 read GetWordBoolProp write SetWordBoolProp stored False;
property StartOfWeek: Smallint index 17 read GetSmallintProp write SetSmallintProp stored False;
property UseCurrentDate: WordBool index 18 read GetWordBoolProp write SetWordBoolProp stored False;
property Visible: WordBool index 19 read GetWordBoolProp write SetWordBoolProp stored False;
property Year: Integer index 20 read GetIntegerProp write SetIntegerProp stored False;
property Cursor: Smallint index 21 read GetSmallintProp write SetSmallintProp stored False;
property OnClick: TNotifyEvent read FOnClick write FOnClick;
property OnChange: TNotifyEvent read FOnChange write FOnChange;
property